/**
 * 高精度:加法  整数/小数>=0
 * @param a string|number 数字 >=0
 * @param b string|number 数字 >=0
 * @return string
 */
$.bcAddDot = function(a, b){
	const R0=n=>'0'.repeat(n), R=/0+$/, SPT=v=>{
		const [i, d] = (v+'').split('.');
		return [i, d?d.replace(R,''):''];
	};
	$.bcAddDot = function(a, b){
		let [ai,ad]=SPT(a), [bi,bd]=SPT(b);
		if(!ad && !bd) return $.bcAddInt(ai, bi);
		const A=ad.length, B=bd.length, m=A>B?A:B;
		if(A!==B) A>B?(bd+=R0(A-B)):(ad+=R0(B-A));
		let v=$.bcAddInt(ai+ad,bi+bd), n=v.length;
		if(n<m+1) v=R0(m+1-n)+v; //长度至少1位整数
		const d = v.slice(-m).replace(R,'');
		return v.slice(0,-m)+(d?'.'+d:'');
	};
	return $.bcAddDot(a, b);
};
